<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <!--
    <link href="../static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="../static/bootstrap/css/docs.css" rel="stylesheet" type="text/css"/>
    -->
   <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
   <link href="/static/viewback/css/mycss.css" rel="stylesheet" type="text/css"/>
   
   <title>会员信息</title>
</head>
<body>
<div class="header"></div>
<include file="public:header"/>
<ul class="breadcrumb">
    <li>
      <a href="/Admin/user/userList"><i class="icon-home"></i></a> <span class="divider">/</span>
    </li>
    <li>
      <a href="/Admin/user/userList"><i class="icon-user"></i></a> <span class="divider">/</span>
    </li>
    <li>
        <a href="/Admin/user/userList"><i class="icon-list-alt"></i></a><span class="divider">/</span>
    </li>
    <li class="active">{$userInfo.username}的个人信息</li>
 </ul>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span2">
                <include file="public:leftbar"/>
            </div>
            <div class="span10">
                    <div class="">
                        <fieldset>
                            <legend><h3>个人信息</h3></legend>
                            <form action="/Admin/user/userEdit" method="post">
                                <!--头像列表对话框-->
                                <div class="modal" id="myModal" style="display: none;width: 500px;">
                                    <div class="modal-header">
                                      <a class="close" data-dismiss="modal">×</a>
                                      <h3>头像列表</h3>
                                    </div>
                                    <div class="modal-body">
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/001.jpg"/><img src="/static/view/image/head-img/001.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/002.jpg"/><img src="/static/view/image/head-img/002.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/003.jpg"/><img src="/static/view/image/head-img/003.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/004.jpg"/><img src="/static/view/image/head-img/004.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/005.jpg"/><img src="/static/view/image/head-img/005.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/006.jpg"/><img src="/static/view/image/head-img/006.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/007.jpg"/><img src="/static/view/image/head-img/007.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/008.jpg"/><img src="/static/view/image/head-img/008.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/009.jpg"/><img src="/static/view/image/head-img/009.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/010.jpg"/><img src="/static/view/image/head-img/010.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/011.jpg"/><img src="/static/view/image/head-img/011.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/012.jpg"/><img src="/static/view/image/head-img/012.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/013.jpg"/><img src="/static/view/image/head-img/013.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/014.jpg"/><img src="/static/view/image/head-img/014.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/015.jpg"/><img src="/static/view/image/head-img/015.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/016.jpg"/><img src="/static/view/image/head-img/016.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/017.jpg"/><img src="/static/view/image/head-img/017.jpg" width="60px;"/>
                                        <input name="head_img" type="radio" value="/static/view/image/head-img/018.gif"/><img src="/static/view/image/head-img/018.gif" width="60px;"/>
                                    </div>
                                    <div class="modal-footer">
                                      <a href="#" class="btn btn-primary" data-dismiss="modal">确定</a>
                                    </div>
                                  </div>
                                <!--头像列表对话框-->
                                <table class="table table-bordered table-hover">
                                    <tr><th>头像</th><td><a data-toggle="modal" href="#myModal" data-keyboard="true" data-backdrop="false"><img src="{$userInfo.head_img}" width="100px;"/></a></td></tr>
                                    <tr><th>用户ID</th><td><input readonly name="id" type="number" value="{$userInfo.id}" id="uid" class="span4"></td></tr>
                                    <tr><th>用户名</th><td>{$userInfo.username}</td></tr>
                                    <tr><th>群组</th><td>{$userInfo.role}</td></tr>
                                    <tr><th>积分</th><td>{$userInfo.credits}</td></tr>
                                    <tr><th>姓名</th><td><input readonly name="name" value="{$userInfo.name}" class="span4"/></td></tr>
                                    <tr><th>性别</th>
                                        <td><div id="gender">{$userInfo.gender}</div>
                                            <div id="gender-radio" style="display: none;">
                                                <if condition="$userInfo.gender eq '男'">
                                                    <input readonly name="gender" value='男' type="radio" checked="checked"/>男
                                                    <input readonly name="gender" value='女' type="radio"/>女
                                                <else/>
                                                    <input readonly name="gender" value='男' type="radio"/>男
                                                    <input readonly name="gender" value='女' type="radio" checked="checked"/>女
                                                </if>
                                            </div> 
                                        </td>
                                    </tr>
                                    <tr><th>出生年月</th><td><input readonly name="birth_day" type="date" value="{$userInfo.birth_day}" class="span4" id="birthday"/></td></tr>
                                    <tr><th>注册时间</th><td>{$userInfo.register_time}</td></tr> 
                                    <tr><th>最后登录时间</th><td>{$userInfo.login_time}</td></tr>
                                    <tr><th>邮箱</th><td><input readonly name="email" type="email" value="{$userInfo.email}" class="span4"/></td></tr>
                                    <tr><th>电话</th><td><input readonly name="phone" type="number" value="{$userInfo.phone}" class="span4"/></td></tr>
                                    <tr><th>职业</th><td><input readonly name="profession"  value="{$userInfo.profession}" class="span4"/></td></tr>
                                    <tr><th>地址</th><td><input readonly name="address"  value="{$userInfo.address}" class="span4"/></td></tr>
                                    <if condition="$userInfo.id eq $_SESSION['userInfo']['id']">
                                        <tr>
                                            <th>操作</th>
                                            <td>
                                                <button class="btn btn-primary" type="button" id="edit">编辑</button>
                                                <button class="btn btn-primary" type="submit" id="submit" style="display: none">提交修改</button>
                                                <php>if($_GET['flag']=='error'){echo "<font color='red'>未做任何修改</font>";}</php>
                                            </td>
                                        </tr>
                                    <else/>
                                    &nbsp;
                                    </if>
                                </table>
                            </form>
                        </fieldset>
                    </div>
            </div>
        </div>
</div>
<include file="public:footer"/>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/static/viewback/js/bootstrap-modal.js"></script>
<script type="text/javascript" src="/static/viewback/js/jquery-1.8.3.js"></script>
<script src="/static/bootstrap/js/jquery.ui.core.js"></script>
<script src="/static/bootstrap/js/jquery.ui.datepicker.js"></script>

<script type="text/javascript">
    $(document).ready(function(){
        //$( "#birthday" ).datepicker();
        $('#edit').click(function(){
            $(this).css('display','none');
            $('input').attr('readonly',false);
            $('input#uid').attr('readonly',true);
            $('#gender').css('display','none');
            $('#gender-radio').css('display','block');
            $('#submit').css('display','block');
        });
    });
</script>
</body>
</html>

